//
//  YAYIPersoninfoSetCell.m
//  yayi
//
//  Created by Veer on 16/3/18.
//  Copyright © 2016年 hxp. All rights reserved.
//

#import "YAYIPersoninfoSetCell.h"

#import "YAYISettingItemModel.h"

@implementation YAYIPersoninfoSetCell

- (void)setModel:(YAYISettingItemModel *)model
{
    //[super setItem:item];
    _model = model;
    
    self.textLabel.text = model.name;
    self.detailTextLabel.text = model.detail;
    
    if (NO == model.isHaveArrow) {
        self.accessoryType = UITableViewCellAccessoryNone;
    }else{
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }

}

+ (instancetype)cellWith:(UITableView *)tableview
{
    static NSString *cellID = @"mecell";
    
    YAYIPersoninfoSetCell *cell = [tableview dequeueReusableCellWithIdentifier:cellID];
    //YAYIPersoninfoCell *cell = [super cellWith:tablevie];
    
    if (nil == cell) {
        cell = [[YAYIPersoninfoSetCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellID];
        
    }
    
    return cell;
}



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        self.textLabel.font = [UIFont systemFontOfSize:15];
        self.textLabel.textColor = YAYIColor(92, 92, 92);
        
        self.detailTextLabel.font = [UIFont systemFontOfSize:15];
        self.detailTextLabel.textColor = YAYIColor(92, 92, 92);
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
